package com.mqtt.ctwingmqtt.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import com.mqtt.ctwingmqtt.domain.dto.UserDTO;
import com.mqtt.ctwingmqtt.domain.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


@Mapper
public interface UserMapper extends BaseMapper<User> {

    User auth(String username, String password);

    String getRole(@Param("username")String username);

    String getPassword(@Param("username")String username);

    User selectByName(String username);

    int inserti(User user);

    Integer getRoleIdByRoleName(String role);

    List<String> getPermissionsByRoleId(Integer roleId);
}
